﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace RoadTeam.Pub
{
  public  class ConverTable
    {
        public static DataTable ToDataTable(DataRow[] rows)
        {
            if (rows == null || rows.Length == 0) return null;
            DataTable tmp = rows[0].Table.Clone();  // 复制DataRow的表结构
            foreach (DataRow row in rows)
                //    tmp.Rows.Add(row);  // 将DataRow添加到DataTable中
                tmp.ImportRow(row);
            return tmp;
        }
    }
}
